package ace.tool.generate.code.impl.service.model.input;

import ace.tool.generate.code.impl.resolver.enums.RestTenantAdminEntityOfAppEnum;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author caspar
 * @date 2024/1/11 9:19
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GenerateModelInput {

  /**
   * 类名称
   */
  @NotNull
  private String name;

  /**
   * 指定表名
   */
  @Nullable
  private String tableName;

  /**
   * 类备注
   */
  @Builder.Default
  private String remark = "";


  /**
   * 是否应用业务框架类型.
   */
  @Builder.Default
  private Boolean frameworkBizAppFlag = Boolean.FALSE;

  /**
   * 是否应用业务实体框架类型.
   */
  @Builder.Default
  private Boolean frameworkBizEntityOfAppFlag = Boolean.FALSE;

  /**
   * 是否应用业务实体框架类型.
   */
  @Builder.Default
  private List<RestTenantAdminEntityOfAppEnum> restTenantAdminEntityOfAppEnumList = new ArrayList<>();

  /**
   * 类字段
   */
  @NotNull
  @NotEmpty
  private List<GenerateModelFieldInput> fields;

  /**
   * 表索引
   */
  private List<GenerateIndexInput> indexes;

  /**
   * dto类是否输出注释
   */
  @Builder.Default
  private Boolean outputDtoRemarkFlag = Boolean.FALSE;
}
